<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    .active {
      width: 200px;
      height: 100px;
      border: 2px solid red;
    }

    .backs {
      background: rosybrown;
    }

    .objactive {
      width: 400px;
      height: 300px;
      border: 1px solid black;
    }

    .objbacks {
      background: cadetblue;
    }

  </style>
</head>

<body>
  <div id="app">
    <!-- 数组简化操作 -->
    <div :class="arrclass"></div>

    <!-- 对象简化操作 -->
    <div :class="objclass"></div>
  </div>
  <script src="../js/vue.js"></script>
  <script>
    const vm = new Vue({
      el: "#app",
      data: {
        arrclass: ["active", "backs"],
        objclass: {
          objactive: true,
          objbacks: true
        }
      },
      methods: {}
    });

  </script>
</body>

</html>
